package com.andy.wang.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 *
 * @TableName roomchitchat
 */
@TableName(value ="roomchitchat")
@Data
public class Roomchitchat implements Serializable {
    /**
     * 房间聊天ID
     */
    @TableId(type = IdType.AUTO)
    private Integer rcID;

    /**
     * 聊天信息发起者：userID
     */
    @TableField("chitchatIn")
    private Integer chitchatIn;

    /**
     * 视频
     */
    @TableField("messageSVG")
    private String messageSVG;

    /**
     * 图片
     */
    @TableField("messageIMG")

    private String messageIMG;

    /**
     * 纯文字
     */
    @TableField("messageText")
    private String messageText;

    /**
     * 当前发布时间
     */
    @TableField("messageDateTime")
    private Date messageDateTime;

    /**
     * 是否撤回 【0.不撤回   1.撤回】
     */
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Roomchitchat other = (Roomchitchat) that;
        return (this.getRcID() == null ? other.getRcID() == null : this.getRcID().equals(other.getRcID()))
            && (this.getChitchatIn() == null ? other.getChitchatIn() == null : this.getChitchatIn().equals(other.getChitchatIn()))
            && (this.getMessageSVG() == null ? other.getMessageSVG() == null : this.getMessageSVG().equals(other.getMessageSVG()))
            && (this.getMessageIMG() == null ? other.getMessageIMG() == null : this.getMessageIMG().equals(other.getMessageIMG()))
            && (this.getMessageText() == null ? other.getMessageText() == null : this.getMessageText().equals(other.getMessageText()))
            && (this.getMessageDateTime() == null ? other.getMessageDateTime() == null : this.getMessageDateTime().equals(other.getMessageDateTime()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRcID() == null) ? 0 : getRcID().hashCode());
        result = prime * result + ((getChitchatIn() == null) ? 0 : getChitchatIn().hashCode());
        result = prime * result + ((getMessageSVG() == null) ? 0 : getMessageSVG().hashCode());
        result = prime * result + ((getMessageIMG() == null) ? 0 : getMessageIMG().hashCode());
        result = prime * result + ((getMessageText() == null) ? 0 : getMessageText().hashCode());
        result = prime * result + ((getMessageDateTime() == null) ? 0 : getMessageDateTime().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", rcID=").append(rcID);
        sb.append(", chitchatIn=").append(chitchatIn);
        sb.append(", messageSVG=").append(messageSVG);
        sb.append(", messageIMG=").append(messageIMG);
        sb.append(", messageText=").append(messageText);
        sb.append(", messageDateTime=").append(messageDateTime);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
